import request from '@/utils/request'
import type { OrderGoodsData } from './types'

class APIBill {
    /** 获取订单列表 */
    static getSalesLedger(params: PageQuery, data: OrderGoodsData) {
        return request<any, ResponseData>({
            url: '/getSalesLedger',
            method: 'POST',
            params,
            data
        })
    }

    /** 获取发票类型 */
    static getInvoiceType() {
        return request<any, ResponseData>({
            url: '/getInvoiceType',
            method: 'POST',
        })
    }

    /** 导出 */
    static exportRecharge(data: any) {
        return request<any, ResponseData>({
            url: '/exportRecharge',
            method: 'POST',
            data,
            responseType: 'blob'
        })
    }
}

export default APIBill
